package com.example.everying.service.content;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.everying.model.entity.content.ActivityApply;
import com.example.everying.model.vo.content.ActivityApplyVo;
import com.example.everying.model.vo.content.ApplyViewVo;
import com.example.everying.utils.Result;
import org.springframework.scheduling.annotation.Async;

import java.util.List;

public interface ActivityApplyService extends IService<ActivityApply> {

    IPage<ActivityApply> selectPage(Page<ActivityApply> pageParam, ActivityApplyVo applyVo);
    Result<?> applyAdd(ActivityApplyVo applyVo);
    boolean applyEdit(ActivityApplyVo applyVo);

    /**
     * 申请人列表查询
     * @param artId
     * @return
     */
    List<ActivityApplyVo> applyList(String artId);

    List<ActivityApply> getApplyListByArticleIds(List<String> articleIds);

    ApplyViewVo appRead(List<String> artId,String ordersStatus);

//    @Async
//    void sendSystemNotification(String userId, String title, String content);

    @Async
    void sendSystemNotification(String userId, String title, String content, String type, String artInfo);

    // 获取用户名称
    String getUserNickname(String userId);

    // 获取用户头像
    String getUserAvatar(String userId);
}
